class LinkedNode:
    def __init__(self, val):
        self.val = val
        self.next = None


class BinaryTreeNode:
    def __init__(self, val):
        self.val = val
        self.left = None
        self.right = None


class BinaryTreeNodeWithParent(BinaryTreeNode):
    def __init__(self, val):
        super(BinaryTreeNodeWithParent, self).__init__(val)
        self.parent = None
